<!DOCTYPE html> 
<html lang="et">
    <head>
      <title>My Facebook Login Page</title>
    </head>
    <body>
     <h1 id="title_header">Laevade pommitamine</h1>
      <div id="fb-root"></div>
      <script>
        window.fbAsyncInit = function() {
          FB.init({
            appId      : '272723686143757',
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true
          });
        };
        (function(d){
           var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
           js = d.createElement('script'); js.id = id; js.async = true;
           js.src = "//connect.facebook.net/en_US/all.js";
           d.getElementsByTagName('head')[0].appendChild(js);
         }(document));
      </script>
        <div class="fb-login-button">Login with Facebook</div>
        
      
<button name="my_full_name" onclick="ShowMyName()" value="My Name" />

<script>

function ShowMyName() {

        FB.api("/me",

                function (response) {

                    alert('Name is ' + response.name);

                });
};

</script>
        
    </body>
 </html>